In this tutorial, we will see how to do Session replication in Weblogic Cluster You now need to use the node1 and node2 created before In session-test.war/WEB-INF/web.xml, add:
<web-app>
<display-name>Session Test</display-name>
<description>...</description>
<distributable/> <!-- -->
...
</web-app>
Your application’s HTTP sessions now use the distributed cache. |
Now:
You can configure session replication here:
Inclined to build a profession as JBoss Developer? Then here is the blog post on, explore JBoss Training
Replication trigger: SET, SET_AND_GET, SET_AND_NON_PRIMITIVE_GET, ACCESS
Replication granularity: SESSION, ATTRIBUTE, FIELD
deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml:
<deployment ...>
...
<bean name="CacheConfigurationRegistry" ...>
...
<property name="newConfigurations">
<map keyClass="java.lang.String" valueClass="org.jboss.cache.config.Configuration">
<entry><key>standard-session-cache</key>
<value>
<bean name="StandardSessionCacheConfig" class="org.jboss.cache.config.Configuration">
...
<property name="clusterName">${jboss.partition.name:DefaultPartition}-SessionCache</property>
<property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
<property name="fetchInMemoryState">true</property>
<property name="nodeLockingScheme">PESSIMISTIC</property>
<property name="isolationLevel">REPEATABLE_READ</property>
<property name="useLockStriping">false</property>
<property name="cacheMode">REPL_ASYNC</property>
<property name="syncReplTimeout">17500</property>
<property name="lockAcquisitionTimeout">15000</property>
...
</bean>
</value>
</entry>
...
</map>
</property>
...
</bean>
...
</deployment>
You can also specify for each application some parameters: WEB-INF/jboss-web.xml:
<jboss-web>
<replication-config>
<replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger>
<replication-granularity>SESSION</replication-granularity>
</replication-config>
</jboss-web>
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.